import request from '@/utils/request'

// 查询gongneng列表
export function listFormula(query) {
  return request({
    url: '/gongyi/formula/list',
    method: 'get',
    params: query
  })
}

// 查询gongneng详细
export function getFormula(id) {
  return request({
    url: '/gongyi/formula/' + id,
    method: 'get'
  })
}

// 新增gongneng
export function addFormula(data) {
  return request({
    url: '/gongyi/formula',
    method: 'post',
    data: data
  })
}

// 修改gongneng
export function updateFormula(data) {
  return request({
    url: '/gongyi/formula',
    method: 'put',
    data: data
  })
}

// 删除gongneng
export function delFormula(id) {
  return request({
    url: '/gongyi/formula/' + id,
    method: 'delete'
  })
}

// 导出gongneng
export function exportFormula(query) {
  return request({
    url: '/gongyi/formula/export',
    method: 'get',
    params: query
  })
}